@{block content}


<h1>{$title}</h1>

<p>
    <a href="{plink Privileges:add}" class="button ui-state-default ui-corner-all" title="{_'Add privilege'}">{_"Add privilege"}</a>
    {if ($search !== "" && $search !== null)}
        <a href="{plink default ''}" class="button ui-state-default ui-corner-all" title="{_'Show all privileges'}">{_"Show all privileges"}</a>
    {/if}
</p>


{include '../aclSearch.phtml'}

{snippet list}

    {control paginator}

    <table>
        <tr><th>{_"ID"}</th><th>{_"Name"}</th><th>{_"Created"}</th><th>{_"Edit"}</th><th>{_"Delete"}</th></tr>
    {foreach $privileges as $privilege}
        <tr>
            <td>{$privilege['id']}</td>
            <td>{$privilege['name']}</td>
            <td>{$privilege['created']->format("j.n.Y G:i:s")}</td>
            <td><a href="{plink Privileges:edit, $privilege['id']}" class="button ui-state-default ui-corner-all" title="{_'Edit privilege'}"><span class="ui-icon ui-icon-wrench">{_"edit"}</span></a></td>
            <td><a href="{plink Privileges:delete, $privilege['id']}" class="button ui-state-default ui-corner-all" title="{_'Delete privilege'}"><span class="ui-icon ui-icon-trash">{_"delete"}</span></a></td>
        </tr>
        {/foreach}
    </table>

{/snippet}